User Manual: Simplify VFD Integration for ERPNext
User Manual: Simplify VFD Integration for ERPNext
1. Overview
The Simplify VFD Integration allows seamless communication between ERPNext and the Simplify Virtual Fiscal Device (VFD) system. It facilitates automated generation and posting of fiscal invoices, ensuring compliance with tax authority regulations through real-time API interactions.
2. Key Features
- Auto and manual generation of VFD tokens (Bearer & Refresh)
- Direct VFD invoice generation from Sales Invoices
- Support for multiple tax categories (standard, exempt, etc.)
- Posting VFD Provider records for traceability
- Token expiry management and auto-refresh logic
3. Pre-Requisites
- ERPNext v13+ with internet access
- Active Simplify VFD API credentials (username/password)
- Configured "Simplify VFD Settings" per company
- Items assigned with valid Tax Templates and codes
4. Step-by-Step Usage
a. Setup:
- Go to
Simplify VFD Settings - Enter
Company,Username, andPassword - Click "Get Token" to generate bearer and refresh tokens
b. Sales Invoice Posting:
- Create and submit a Sales Invoice
- Ensure
VFD Customer IDandVFD Cust ID Typeare set (auto-fetched from Customer) - Click "Generate VFD" if auto is not enabled
- System posts to Simplify VFD and updates invoice with receipt info
c. Auto-Posting:
- Ensure "Is Auto Generate VFD" is checked to trigger posting automatically upon submission
5. Script Customizations
- Custom Fields Added (via
create_custom_fields):- On
Customer,Sales Invoice,Item Tax Template,Mode of Payment
- On
- JavaScript UI Enhancements
- Button handler to invoke
get_bearer_token()
- Button handler to invoke
- Python Backend
post_fiscal_receipt()to push invoice to VFDrefresh_bearer_token()to renew tokenssend_simplify_vfd_request()to standardize HTTP calls
6. Troubleshooting (Common Errors and Resolutions)
| Error | Cause | Solution |
|---|---|---|
| Invalid Username or Password | Wrong credentials | Update Simplify VFD Settings with valid login info |
| Token Expired | Expired token | Re-run "Get Token" or check auto-refresh logic |
| VFD Status = Failed | API call unsuccessful | Check logs in VFD Provider Posting or retry manual post |
| No VFD Tax Code | Missing in Item Tax Template | Set vfd_taxcode on relevant Item Tax Templates |
7. User Roles and Permissions
- System Manager: Full access including token generation
- Accounts User: Can generate VFD and create invoices
- Healthcare Receptionist: Hidden VFD section via
depends_on
8. Key Notes
- Token lifespan is 20-25 minutes; auto-refresh is implemented
- Errors are logged using
frappe.log_error()for audit - Uses retry logic for API calls (up to 3 attempts)
- VFD posting info stored in
VFD Provider Postingdoctype
9. What Business Process Pain Point Does It Help Remove
- Eliminates manual VFD invoice generation outside ERP
- Reduces errors due to human input in tax code selection
- Ensures real-time compliance with fiscal authority
- Provides centralized tracking of invoice-VFD relations in ERP
End of Document
Last updated 4 days ago
Was this helpful?